<template>
  <div>
      <p>等级：<input type="text" v-model="username"></p>
      <p><button @click="btn">修改</button></p>
  </div>
</template>

<script>
    export default {
        name: "UpdateGrade",
        data(){
          return{
            name:'',
            uid:this.$route.params.id
          }
        },
        methods:{
          btn(){
            let form_data=new FormData()
            form_data.append('username',this.name)
            form_data.append('uid',this.uid)
            axios({
              url:'http://127.0.0.1:8000/app01/update/',
              method:'post',
              data:form_data
            }).then(res=>{
              console.log(res)
            })
          }
        },
    }
</script>

<style scoped>

</style>